/* 自定义组件样式文件 */

/* CustomButton 组件样式 */
.custom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  outline: none;
  border: none;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.custom-button:focus {
  outline: none;
}

.custom-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.custom-button.tiny {
  padding: 4px 6px;
  font-size: 12px;
}

.custom-button.small {
  padding: 8px 12px;
  font-size: 12px;
}

.custom-button.default {
  padding: 10px 16px;
  font-size: 14px;
}

.custom-button.large {
  padding: 12px 20px;
  font-size: 16px;
}

.custom-button.xlarge {
  padding: 16px 24px;
  font-size: 18px;
}

.custom-button.primary {
  background-color: #1890ff;
  color: white;
}

.custom-button.primary:hover:not(:disabled) {
  opacity: 0.9;
}

.custom-button.secondary {
  background-color: rgba(24, 144, 255, 0.1);
  color: #1890ff;
  border: 1px solid #1890ff;
}

.custom-button.secondary:hover:not(:disabled) {
  background-color: rgba(24, 144, 255, 0.2);
}

.custom-button.danger {
  background-color: #ff4d4f;
  color: white;
}

.custom-button.danger:hover:not(:disabled) {
  opacity: 0.9;
}

.custom-button.ghost {
  background-color: transparent;
  color: #333;
  border: 1px solid transparent;
}

[data-theme="dark"] .custom-button.ghost {
  color: #fff;
}

.custom-button.ghost:hover:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .custom-button.ghost:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
}

.custom-button.link {
  background-color: transparent;
  color: #1890ff;
  border: none;
  text-decoration: underline;
}

.custom-button.link:hover:not(:disabled) {
  opacity: 0.8;
}

.custom-button.dashed {
  background-color: transparent;
  border: 1px dashed #d9d9d9;
  color: #333;
}

[data-theme="dark"] .custom-button.dashed {
  border: 1px dashed #434343;
  color: #fff;
}

.custom-button.dashed:hover:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .custom-button.dashed:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
}

/* CustomAlert 组件样式 */
.custom-alert {
  /* 样式已在组件中通过内联样式实现 */
}

/* CustomProgressBar 组件样式 */
.custom-progress-bar {
  display: flex;
  align-items: center;
}

.custom-progress-bar-track {
  flex: 1;
}

.custom-progress-bar-fill {
  /* 样式已在组件中通过内联样式实现 */
}

.custom-progress-bar-info {
  /* 样式已在组件中通过内联样式实现 */
}

/* CustomCard 组件样式 */
.custom-card {
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.custom-card.small {
  padding: 16px;
}

.custom-card.default {
  padding: 24px;
}

.custom-card.large {
  padding: 32px;
}

.custom-card.bordered {
  border: 1px solid;
}

[data-theme="dark"] .custom-card.bordered {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .custom-card.bordered {
  border-color: rgba(0, 0, 0, 0.08);
}

.custom-card.hoverable {
  cursor: pointer;
}

.custom-card.hoverable:hover:not(:disabled) {
  transform: translateY(-2px);
}

/* CustomTag 组件样式 */
.custom-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Notification 组件样式 */
.notification-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  width: 380px;
  max-width: calc(100vw - 48px);
}

@media (max-width: 768px) {
  .notification-container {
    width: calc(100vw - 32px);
    left: 16px;
    right: 16px;
  }
}

.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid;
  margin-bottom: 16px;
}

.notification-item.success {
  background-color: rgba(35, 135, 85, 0.9);
  border-color: rgba(35, 135, 85, 0.3);
}

.notification-item.error {
  background-color: rgba(206, 50, 50, 0.9);
  border-color: rgba(206, 50, 50, 0.3);
}

.notification-item.warning {
  background-color: rgba(204, 137, 0, 0.9);
  border-color: rgba(204, 137, 0, 0.3);
}

.notification-item.info {
  background-color: rgba(30, 80, 180, 0.9);
  border-color: rgba(30, 80, 180, 0.3);
}

.notification-icon {
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.notification-message {
  word-break: break-word;
}

.notification-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 12px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-close:hover {
  opacity: 1;
}

.notification-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.5;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* SkeletonLoader 组件样式 */
.skeleton-loader {
  border-radius: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

[data-theme="dark"] .skeleton-loader {
  background-color: #444;
}

[data-theme="light"] .skeleton-loader {
  background-color: #e0e0e0;
}

.skeleton-loader.avatar {
  border-radius: 50%;
}

.skeleton-loader.card {
  border-radius: 8px;
}

.skeleton-paragraph {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-paragraph-line {
  display: flex;
  gap: 8px;
}

/* CustomSpin 组件样式 */
.custom-spin {
  /* 样式已在组件中通过内联样式实现 */
}

/* CustomTable 组件样式 */
.custom-table {
  /* 样式已在组件中通过内联样式实现 */
}

/* LoadingSpinner 组件样式 */
.loading-spinner-fullscreen {
  /* 样式已在组件中通过内联样式实现 */
}

.loading-spinner-container {
  /* 样式已在组件中通过内联样式实现 */
}

/* CustomMenu 组件样式 */
.custom-menu-item {
  display: flex;
  align-items: center;
  border-radius: 8px;
  margin: 4px 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.custom-menu-item-content {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px;
}

.custom-menu-item-icon {
  font-size: 18px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-menu-item-label {
  font-weight: 500;
  flex: 1;
}

.custom-menu-item-arrow {
  margin-left: 8px;
  transition: transform 0.2s ease;
  font-size: 12px;
}

.custom-menu-item-arrow.open {
  transform: rotate(90deg);
}

/* AnimatedList 组件样式 */
.animated-list-container {
  position: relative;
}

.animated-list-scroll {
  overflow-y: auto;
  border-radius: 16px;
}

.animated-list-item {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.animated-list-item-content {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-list-gradient-top,
.animated-list-gradient-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 2;
}

/* 列表项微光效果 */
.list-item-shimmer {
  animation: listShimmer 3s infinite;
}

@keyframes listShimmer {
  0% {
    transform: translateX(-100%);
  }
  20% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(200%);
  }
}

.animated-list-gradient-top {
  top: 0;
}

.animated-list-gradient-bottom {
  bottom: 0;
  height: 100px;
}

/* CustomProgressBar 组件样式 */
.custom-progress-bar {
  display: flex;
  align-items: center;
}

.custom-progress-bar-track {
  flex: 1;
}

.custom-progress-bar-fill {
  /* 样式已在组件中通过内联样式实现 */
}

.custom-progress-bar-info {
  /* 样式已在组件中通过内联样式实现 */
}

/* MagicBento 组件样式 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  isolation: isolate;
}

.card:hover {
  transform: translateY(-4px);
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.card__content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.card__description {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .card__title {
    font-size: 1.25rem;
  }
  
  .card__description {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 160px;
  }
  
  .card__header {
    margin-bottom: 0.5rem;
  }
}

/* 热点数据组件样式 */
.hot-item-container {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.hot-item-index {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  margin-right: 12px;
}

.hot-item-content {
  flex: 1;
  margin-left: 12px;
}

.hot-item-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.hot-item-title-link {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-right: 8px;
  margin: 4px 0;
}

.hot-item-description {
  font-size: 12px;
  line-height: 1.4;
}

.hot-item-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  margin-left: 12px;
}

.hot-empty-state,
.hot-loading-container {
  text-align: center;
  padding: 40px 0;
}

.hot-loading-text {
  margin-top: 16px;
  font-size: 16px;
}

/* 主题相关样式 */
[data-theme="dark"] .card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 滚动条样式 */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* AnimatedList 内部滚动条样式 - 深色主题 */
.animated-list-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.animated-list-scroll::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

.animated-list-scroll::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

.animated-list-scroll::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* AnimatedList 内部滚动条样式 - 浅色主题 */
[data-theme="light"] .animated-list-scroll::-webkit-scrollbar-track {
  background: #f0f2f5;
  border-radius: 4px;
}

[data-theme="light"] .animated-list-scroll::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

[data-theme="light"] .animated-list-scroll::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Firefox 滚动条样式 */
.animated-list-scroll {
  scrollbar-width: thin;
  scrollbar-color: #444 #1a1a1a;
}

[data-theme="light"] .animated-list-scroll {
  scrollbar-color: #c1c1c1 #f0f2f5;
}

/* CustomSelect 组件样式 */
.custom-select {
  /* 样式已在组件中通过内联样式实现 */
}

.custom-select-trigger {
  /* 样式已在组件中通过内联样式实现 */
}

.custom-select-arrow {
  transition: transform 0.2s ease;
}

.custom-select-arrow.open {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  /* 样式已在组件中通过内联样式实现 */
}

.custom-select-option {
  /* 样式已在组件中通过内联样式实现 */
}

.custom-select-option.selected {
  /* 样式已在组件中通过内联样式实现 */
}
